<%@ page import="bean.BookBean" %>
<%@ page import="dao.BookDao" %>
<%@ page import="java.util.ArrayList" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>修改图书界面</title>
    <style>
        .center{
            margin-top: 50px;
            margin-left: 600px;
        }
        .cancel{
            position: absolute;
            left: 777px;
            top: 313px;
            text-decoration: none;
            color: #767676;
            border: 1px solid #2c2c2c;
            background-color: #efefef;
            padding: 0 10px;
        }
    </style>
</head>
<body>
<div class="center">
    <%
        int num = Integer.parseInt(request.getParameter("bid")) - 1;
        ArrayList<BookBean> all = null;
        all = new BookDao().get_ListInfo();
    %>
    <h1>修改图书界面</h1>
    <form action=updateBookServlet method="post">
        <table border=1>
            <tr>
                <th>图书id</th>
                <td><input readonly name=bid value=<%=all.get(num).getBid()%>></td>
            </tr>
            <tr>
                <th>图书编号</th>
                <td><input name=card value=<%=all.get(num).getCard()%>></td>
            </tr>
            <tr>
                <th>图书名</th>
                <td><input name=name value=<%=all.get(num).getName()%>></td>
            </tr>
            <tr>
                <th>作者</th>
                <td><input name=autho value=<%=all.get(num).getAutho()%>></td>
            </tr>
            <tr>
                <th>图书数量</th>
                <td><input name=num value=<%=all.get(num).getNum()%>></td>
            </tr>
            <tr>
                <th>出版社</th>
                <td><input name=press value=<%=all.get(num).getPress()%>></td>
            </tr>
            <tr>
                <th>图书类别</th>
                <td><input name=type value=<%=all.get(num).getType()%>></td>
            </tr>
            <tr>
                <td colspan=2><input type=submit value=修改图书 style="margin-left: 55px"></td>
                <a href="bookmanage.jsp" class="cancel">取消</a>
            </tr>

        </table>
    </form>
</div>
</body>
</html>
